<template>
	<view class="specialarea">
		<view class="search-container">
			<view class="search">
				<input class="ipt" type="text" placeholder="请输入搜索关键字" v-model="keyword">
			</view>
			<view class="submit">
				<text>搜索</text>
			</view>
		</view>
		<!-- 搜索到的商品列表 -->
		<MallList :mallType="mallType" :productTypeId="productTypeId"></MallList>
	</view>
</template>

<script>
	import MallList from "@/components/mall/MallList/MallList.vue"
	export default {
		components: {
			MallList
		},
		data() {
			return {
				keyword: '',
				productTypeId: '',
				mallType: ''
			}
		},
		methods: {

		},
		onLoad() {
			const routes = getCurrentPages()
			const query = routes[0].$route.query
			this.mallType = query.malltype == "" ? "" : parseInt(query.malltype)
			this.productTypeId = query.typeid == "" ? "" : parseInt(query.typeid)

		}
	}
</script>

<style lang="scss" scoped>
	.specialarea {
		padding: 20rpx 20rpx 0;

		.search-container {
			height: 70rpx;
			background-color: #fff;
			border-radius: 999rpx;
			padding: 0 20rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;

			.search {
				padding-left: 10rpx;
				flex: 1;

				.ipt {
					font-size: 24rpx;
					color: #ccc;
				}
			}

			.submit {
				background-color: #FC5E14;
				color: #fff;
				font-size: 24rpx;
				line-height: 50rpx;
				padding: 0 30rpx;
				border-radius: 999rpx;
			}
		}

	}
</style>
